package com.fcs.controller;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.fcs.entities.User;
import com.fcs.service.IUserService;
@Controller
public class UserController {

	@Autowired
	private IUserService userService;
	
	@RequestMapping("/index")
	public String index(Model model){
		
		List<User> userList = userService.selectAll();
		model.addAttribute("userList", userList);
		Logger logger = Logger.getLogger(UserController.class);
		logger.info("操作成功咯");
		return "index";
	}
}
